import request from '@/utils/request'
//点击树节点获取查询框
export function getqueryfieldList(data) {
    return request({
      url: '/cqbc/dataManageTreePath/getQueryFields',
      method: 'POST',
      data: data
    })
  }

  
//获取表头获取展示字段
export function getthbytreenodeHeaderList(data) {
  return request({
    url: '/cqbc/dataManageTreePath/getshowFields',
    method: 'POST',
    data: data
  })
}

//点击树节点,获取table数据
export function getlistbytreenodeList(data) {
  var d = {
    categoryId: data.categoryId,
    fields: data.fields,
    menuId: data.menuId,
    propertyName: data.propertyName,
    propertyValue: data.propertyValue,
    order: data.order,
    searchcolumn:data.searchcolumn,
    subTableName:data.sub_table_name,
    pathId:data.pathId,//位置id
    zlfs:data.zlfs,//整理方式   传：jian=0  juan=1 xiangmu=3
  }
  return request({
    url: '/cqbc/dataManageTreePath/getList?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'POST',
    data: d
  })
}


//获取内层数据(项目获取卷/卷获取卷内件
export function getinner(data) {
  var d = {
    mainid: data.mainid,
    fields: data.fields,
    mainlevel: data.mainlevel,  //0 1 3
    propertyName: data.propertyName,
    propertyValue: data.propertyValue,
    order: data.order,
    searchcolumn:data.searchcolumn,
    subTableName:data.sub_table_name,
    pathId:data.pathId,//位置id
    zlfs:data.zlfs,//整理方式   传：jian=0  juan=1 xiangmu=3
  }
  return request({
    url: '/cqbc/detail/getinner?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'POST',
    data: d
  })
}


//获取门类存储位置
export function getPath(id) {
  return request({
    url: '/cqbc/dataManageTreePath/getPath/'+id,
    method: 'POST',
  })
}

//给门类新加一个存储位置
export function addPath(data) {
  return request({
    url: '/cqbc/dataManageTreePath/addPath',
    method: 'POST',
    data:data
  })
}
//修改一个存储地址
export function updatePath(data) {
  return request({
    url: '/cqbc/dataManageTreePath/update',
    method: 'POST',
    data:data
  })
}

//删除一个存储位置
export function deletePath(id) {
  return request({
    url: '/cqbc/dataManageTreePath/deletePath/'+id,
    method: 'DELETE',
  })
} 

//修改一个存储位置为启用
export function updateEnable(data) {
  return request({
    url: '/cqbc/dataManageTreePath/updateEnable',
    method: 'POST',
    data:data
  })
}

//格式转换
export function trans(data) {
  return request({
    url: '/cqbc/dataManageTreePath/trans',
    method: 'POST',
    data:data
  })
}

export function getefileinfobydocid(data) {
  return request({
    url: '/cqbc/detail/getefileinfobydocid',
    method: 'POST',
    data: data
  })
}

//获取文件/案卷/项目信息

export function getDataInfo(data) {
  return request({
    url: '/cqbc/detail/getdatainfo',
    method: 'POST',
    data: data
  })
}

//判断pdf文件是否加密
export function pdfIsEncryption(data) {
  return request({
    url: '/cqbc/detail/pdfIsEncryption',
    method: 'post',
    data: data
  })
}